<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ page import="com.scalar.chiptrack.operations.boards.forms.BoardInventoryDataEntryForm,
                 com.scalar.chiptrack.utils.ConfigManager,
				 com.scalar.chiptrack.users.Functionality,
				 com.scalar.chiptrack.commons.Constants" %>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>

<chiptrack:checkLogon sourcePage="/boardInventoryDataEntry.do?action=type" />

<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>

<script src="<%=chipTracContext%>/jsp/includes/scripts/functions.js"></script>
<script src="<%=chipTracContext%>/jsp/includes/scripts/validations.js"></script>
<script src="<%=chipTracContext%>/jsp/includes/scripts/board_inventory.js"></script>

<HTML><HEAD>
<script>

	function selectPartNumber()
	{
		var errors = '';
		var pa = document.getElementById("errors");
		if (document.boardInventorydataentryform.processStepId.value == '0')
		{
            document.boardInventorydataentryform.action="<%=chipTracContext%>/boardInventoryDataEntry.do?action=type";
			document.boardInventorydataentryform.submit();
			//pa.innerHTML = "<li> Please select a valid Part Number " ;
			return false;
		}
		else
		{
			document.boardInventorydataentryform.action="<%=chipTracContext%>/boardInventoryDataEntry.do?action=partnumber";
			document.boardInventorydataentryform.submit();
		}
	}

	//Added by Bhaskar on 25 sep 2003
	function selectLocation()
	{
		var errors = '';
		var pa = document.getElementById("errors");
		if (document.boardInventorydataentryform.locationId.value == '0')
		{
            document.boardInventorydataentryform.action="<%=chipTracContext%>/boardInventoryDataEntry.do?action=partnumber";
			document.boardInventorydataentryform.submit();
			//pa.innerHTML = "<li>Please select a valid Location ";
			//document.boardInventorydataentryform.focus();
			return false;
		}
		else
		{
			document.boardInventorydataentryform.action="<%=chipTracContext%>/boardInventoryDataEntry.do?action=location";
			document.boardInventorydataentryform.submit();
		}
	}

    function selectLotNumber()
    {
		var error = '';
		var pa1 = document.getElementById("errors");
		var locId = document.boardInventorydataentryform.locationId.value;
		var procStepId = document.boardInventorydataentryform.processStepId.value;
		if ( locId == '0' )
		{
			pa1.innerHTML = "<li> Please select a valid location ";
			document.boardInventorydataentryform.locationId.focus();
			return;
		}
		if ( procStepId == '0' )
		{
			pa1.innerHTML = "<li>You cannot create or update a lot for an invalid part Number";
			document.boardInventorydataentryform.processStepId.focus();
			return false;
		}
        if(document.boardInventorydataentryform.lotNo.value=='0')
        {
             document.boardInventorydataentryform.action="<%=chipTracContext%>/boardInventoryDataEntry.do?action=location";
			 document.boardInventorydataentryform.submit();
             return ;
        }
        var pa	= document.getElementById("message");
        var lot = document.boardInventorydataentryform.lotNo.value;
        lot = lot.split("$");
        var insertingLotId = lot[0];

        var lotNumber = lot[1];
        var status    = lot[2];
        if(status=='Ongoing')
		{
			var text = 'This Lot does not have any Shipping instructions.Do U want enter Shipping';
			text     = text+' Instructins<br>Yes<input type="radio" name="clarify" value="yes" ';
			text  	 = text+'onclick="confirm()">' ;
			text= text+' No<input type="radio" name="clarify" value="no"  onclick="confirm()">';
			pa.innerHTML = text ;
			return;
		}
        document.boardInventorydataentryform.action="<%=chipTracContext%>/boardInventoryDataEntry.do?action=lotnumber";
        document.boardInventorydataentryform.submit();
    }


	function boardInventoryDataEntry()
	{
		if ( !checkPartLocationLot() )
			return;
		var insertingDateIn	= document.boardInventorydataentryform["insertingDateIn"];
		var pa				= document.getElementById("message");
		pa.innerHTML		= "";
		var newLotNumber	= document.boardInventorydataentryform["newLotNumber"];

		if( !validateLotNumber() )
		{
			return;
		}
        if( document.boardInventorydataentryform.newLotNumber.length > 1 )
        {
            for ( var m = 0; m < (document.boardInventorydataentryform.newLotNumber.length-1); m++ )
            {
                var lotfirst = document.boardInventorydataentryform.newLotNumber[m].value;
                for ( var n =m+1; n < document.boardInventorydataentryform.newLotNumber.length; n++ )
			    {
				    var lotnext = document.boardInventorydataentryform.newLotNumber[n].value;
                    if( ( lotfirst.trim().toUpperCase() != "" ) && ( lotnext.trim().toUpperCase() != "" ) )
                    {
                        if ( lotfirst.trim().toUpperCase() == lotnext.trim().toUpperCase() )
                        {
                            pa.innerHTML = 'Two Lots have same Name, Please enter different Name';
                            document.boardInventorydataentryform.newLotNumber[n].focus();
                            return;
                        }
                    }
                }
			}
        }
    	if(insertingDateIn.length != null)
		{
			for (var count=0; count < insertingDateIn.length; count++)
			{
				if ( parseInt ( newLotNumber[count].value.trim().length ) > 0 )
				{
					if ( !validateDate ( insertingDateIn[count].value ) )
					{
						insertingDateIn[count].focus();
						return;
					}
				}
			}
		}

		else
		{
			if ( parseInt ( newLotNumber.value.trim().length ) > 0 )
			{
				if ( !validateDate ( insertingDateIn.value ) )
				{
					insertingDateIn.focus();
					return;
				}
			}
		}
		if ( ( document.boardInventorydataentryform.testedQuantity.length == null )  &&
		( document.boardInventorydataentryform.rejectedQuantity.length == null ) )
		{
			var test = document.boardInventorydataentryform.testedQuantity;
			var reje = document.boardInventorydataentryform.rejectedQuantity;
			var qyIn = document.boardInventorydataentryform.insertingQuantityIn;
			if ( parseInt ( newLotNumber.value.trim().length ) > 0 )
			{
				if ( !validateQtyInTestQtyRejQty( test, reje, qyIn, pa ) )
				{
					return;
				}
			}
			if ( parseInt ( qyIn.value.trim().length ) > 0 || parseInt ( test.value.trim().length ) > 0 ||  parseInt ( reje.value.trim().length ) > 0 )
			{
				if ( parseInt ( newLotNumber.value.trim().length ) == 0 )
				{
					pa.innerHTML = 'Please enter a lot number';
					newLotNumber.focus();
					return;
				}
			}
		}
		else
		{
			for ( var aa = 0; aa < document.boardInventorydataentryform.testedQuantity.length; aa++ )
			{
				var test = document.boardInventorydataentryform.testedQuantity[aa];
				var reje = document.boardInventorydataentryform.rejectedQuantity[aa];
				var qyIn = document.boardInventorydataentryform.insertingQuantityIn[aa];
				if ( parseInt ( newLotNumber[aa].value.trim().length ) > 0 )
				{
					if ( !validateQtyInTestQtyRejQty( test, reje, qyIn, pa ) )
					{
						return;
					}
				}
				if ( parseInt ( qyIn.value.trim().length ) > 0 || parseInt ( test.value.trim().length ) > 0 ||  parseInt ( reje.value.trim().length ) > 0 )
				{
					if ( parseInt ( newLotNumber[aa].value.trim().length ) == 0 )
					{
						pa.innerHTML = 'Please enter a lot number';
						newLotNumber[aa].focus();
						return;
					}
				}
			}
		}
		document.boardInventorydataentryform.action="<%=chipTracContext%>/boardInventoryDataEntry.do?action=save";
		enableFields();
		document.boardInventorydataentryform.submit();
	}

    function addTextBoxes()
	{
		var count = 0 ;
		if ( typeof ( document.boardInventorydataentryform["insertingDateIn"].length  ) == 'undefined' )
		{
			count = 1;
		}
		else //( document.boardInventorydataentryform["insertingDateIn"] != null )
		{
			count = document.boardInventorydataentryform["insertingDateIn"].length;
		}

        var htmltext ='<table width ="100%"><tr><td width = "20%" align="center" class="NArialL">';
            htmltext = htmltext + '<input type="text" name="newLotNumber" value="" maxlength="50" class="txfield" size="16"></td>';
            htmltext = htmltext + '<% String date =  (String)request.getAttribute("InsertingDateIn"); %>';
            htmltext = htmltext + '<td width= "20%" align="center" class="NArialL"><table border="0" width="100%"><tr><td width="80%">';
            htmltext = htmltext + '<input type="text" name="insertingDateIn" class="txfield" size="14" maxlength="10" value="<%=date%>"></td>';
			htmltext = htmltext + '<td><a href="javascript:openCalendar(document.boardInventorydataentryform.insertingDateIn['+count+'])">';
			htmltext = htmltext + '<img onMouseOver="window.status=\'Click here to select date\';return true" onMouseOut="window.status=\'\';return true" border="0" align="center" ';
			htmltext = htmltext + 'src="<%=chipTracContext%>/jsp/includes/images/date_selector.gif" height="20" width="20"></a></td></tr></table>';
            htmltext = htmltext + '<td width="20%" align="center" class="NArialL">';
            htmltext = htmltext + '<input type="text" name="insertingQuantityIn" class="txfield" size="16" maxlength="7" value=""></td>';
            htmltext = htmltext + '<td width="20%" align="center" class="NArialL">';
			htmltext = htmltext + '<input type="text" name="testedQuantity" size="16" maxlength="7" class="txfield" value=""></td>';
            htmltext = htmltext + '<td width="20%" align="center" class="NArialL">';
			htmltext = htmltext + '<input type="text" name="rejectedQuantity" size="16" maxlength="7" class="txfield" value="" ></td>';
            htmltext = htmltext + '<td width="20%" align="center" class="NArialL">';
			htmltext = htmltext + '<input type="text" name="dateCodes" size="16" maxlength="7" class="txfield" value="" ></td></tr></table>';
			//<!--/table-->';
        var pa=document.getElementById("font1");
        pa.insertAdjacentHTML('BeforeEnd',htmltext);
    }

	var dateElement = "";
	function openCalendar(dateValue)
	{
		dateElement = dateValue;
		newWindow = window.open('<%=chipTracContext%>/jsp/includes/calendar.html','optionsPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=no,width=180,height=440,resizable=no');
		newWindow.moveTo(550,180);
		newWindow.focus();
	}

	function assignDate(passedValue)
	{
		if ( typeof ( dateElement.value ) == 'undefined')
		{
			document.boardInventorydataentryform.insertingDateIn[0].value = passedValue;
		}
		else
		{
			dateElement.value=passedValue;
		}
		window.focus();
	}



</script>
    <TITLE>Scalarsoft - ChipTrac</TITLE>
	<META http-equiv=Content-Type content="text/html; charset=windows-1252">
	<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type=text/css rel=stylesheet>
	<META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
	<BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">

		<html:form name="boardInventorydataentryform"  type="com.scalar.chiptrack.operations.boards.forms.BoardInventoryDataEntryForm" action="/boardInventoryDataEntry">

			<!-- Top Header Start-->
			<%@ include file="/jsp/includes/header.jsp" %>
			<!-- Top Header End-->

			<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
				<TBODY>
				<TR>
					<td width='180' valign='top' background='<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif'>
						<!-- Side Navigation start -->
						<%@ include file="/jsp/operations/dataentryMenu.jsp" %>
						<!-- end of the side navigations -->

					<TD bgcolor="#ffffff">
					<IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></TD>
					<TD bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
					<TD valign="top" width="100%">

						<IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/clear.gif" width=500 border=0>
						<BR>
						<!-- from here your body starts -->

						<!--String message = (String)request.getAttribute("ErrMsg");
						if(message==null)
						message=""; -->

						<% String action = (String)request.getParameter("action");
						if(action==null)
							action = "";

						if ( request.getAttribute("boardInventorydataentryform")== null )
						{
							BoardInventoryDataEntryForm boardInventorydataentryform = new BoardInventoryDataEntryForm();
							request.setAttribute ( "boardInventorydataentryform",boardInventorydataentryform );
						}
						%>

						<!--% if(!message.equals("")){%>
							<p align ="center">
							 <font face="Verdana" size="-5" align="center" color="#ff0000"><b>< %=message%></b></font>
							</p>
						< % }  %><img src="< %=chipTracContext%>/jsp/includes/images/spacer.gif" height=10-->

						<table width="90%" align=right cellpadding='0' cellspacing='0' border="0">
							<TR><Td colspan='4' class="NArialW" align=center>Board Inventory</td></tr>
                            <TR><TD colspan='4'><IMG src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height='10'></TD></TR>
							<% if ( !user.isActionAllowed ( Functionality.BOARD_INVENTORY, User.USER_ACTION_MODIFY  )  ) { %>
							<tr><td colspan='4' class='NArialS'>
							<font color='blue'><b><%=Constants.NO_MODIFY_RIGHTS %></b>
							</font></td></tr>
							<% } %>
							<tr><td colspan='4' align="left" class='NArialL'>&nbsp;<b><FONT id="errors" color="#FF0000"></font></b></td></tr>
							<tr><td colspan='4'><chiptrack:errors styleClass='NArialL'/></td></tr>
							<tr><td colspan='4'><chiptrack:info styleClass='NArialL'/></td></tr>
							<tr><td colspan='4' align="left" class='NArialL'>&nbsp;<b><font color="#ff0000" id="message"></font></b></td></tr>

							<tr>
							<%if(action.equals("partnumber") || action.equals("location") || action.equals("lotnumber") || action.equals("save")|| action.equals("type") || action.equals("submit") ){ %>
								<td width="25%" class="NArialL">Part Number :<br>
								(<bean:message key = "label.mfgPartNumber" /><!-- Mfg Part Number -->)</td>
								<td width="25%" valign='center'>
								<html:select property="processStepId"  name="boardInventorydataentryform" styleClass="txfield" onchange="selectPartNumber()">
								<html:option value="0">Select Part Number</html:option>
								<html:options collection="partNumberSelectList" property="value" labelProperty="label"/>
								</html:select>
								</font>
								</td>
							<%}%>
								<td colspan="2" width="50%">&nbsp;</td>
							</tr>

							<tr>
							<%if(action.equals("partnumber") || action.equals("location") || action.equals("lotnumber") || action.equals("save") || action.equals("submit") ){ %>
								<td width="25%" class="NArialL">Location :</td>
								<td width="25%" class="NArialL">
								<html:select property="locationId"  name="boardInventorydataentryform" styleClass="txfield" onchange="selectLocation()"  >
								<html:option value="0">Select Location</html:option>
								<html:options collection="locationSelectList" property="value" labelProperty="label"/>
								</html:select>
								</td>
							<%}%>

							<%if(action.equals("location") || action.equals("lotnumber") || action.equals("save") ||   action.equals("submit")|| action.equals("partnumber")){ %>
								<logic:notEqual name="showLotNumbers" value="FALSE">
								<td width="25%" class="NArialL">Lot Number :</td>
								<td width="25%" class="NArialL">
								<html:select property="lotNo"  name="boardInventorydataentryform" styleClass="txfield" onchange="selectLotNumber()"  >
								<html:option value="0">Select Lot Number</html:option>
								<html:option value="-1">-- Create New Lot --</html:option>
								<html:options collection="lotNumbers" property="value" labelProperty="label"/>
								</html:select>
								</td>
								</logic:notEqual>
							<%}%>
							</tr>

							<%if(action.equals("lotnumber") || action.equals("save") || action.equals("submit") ){ %>
							<tr>
								<td width="100%" colspan="4">&nbsp;</td>
							</tr>

							<%if ("true".equalsIgnoreCase((String)request.getAttribute("isNewLot")) == true) { %>
							<% String dateIn = (String)request.getAttribute("InsertingDateIn"); %>

							<tr><td colspan="4">
								<table border="2" width="100%" bordercolor="#FFFFFF">
								<tr>
									<td width="20%" align="center" bgcolor="#993333" class="NArialL">
										<font color="#FFFFFF">New Lot Number *</font></td>
									<td width="20%" align="center" bgcolor="#993333" class="NArialL">
										<font color="#FFFFFF">Date In *</font></td>
									<td width="20%" align="center" bgcolor="#993333" class="NArialL">
										<font color="#FFFFFF">Un tested Qty *</font></td>
									<td width="20%" align="center" bgcolor="#993333" class="NArialL">
										<font color="#FFFFFF">Good Qty </font></td>
									<td width="20%" align="center" bgcolor="#993333" class="NArialL">
										<font color="#FFFFFF">Rejected Qty</font></td>
                                    <td width="20%" align="center" bgcolor="#993333" class="NArialL">
										<font color="#FFFFFF">Date Code</font></td>
								</tr>

								<logic:present name="showData">
								<%

									String[] insertDateIn       = request.getParameterValues ( "insertingDateIn");
									String[] insertQuantityIn   = request.getParameterValues ( "insertingQuantityIn");
									String[] newLotNumber       = request.getParameterValues ( "newLotNumber" );
									String[] testedQuantity     = request.getParameterValues ( "testedQuantity" );
									String[] rejectedQuantity   = request.getParameterValues ( "rejectedQuantity" );
                                    String[] dateCodes           = request.getParameterValues ( "dateCode" );
									int count = newLotNumber.length;
								%>
								<% for (int jj = 0; jj < count; jj++ ) {

                                %>
								<tr>
									<td width="20%" align="center" class="NArialL"><html:text name="boardInventorydataentryform" property="newLotNumber" size="16" maxlength="50" styleClass="txfield" value ="<%=newLotNumber[jj]%>" /></td>
									<td width="20%" align="center" class="NArialL">
									<!--A table is inserted only to improve the layout and avoid distortion when window is not in maximised mode. Bhaskar on 26 Feb 2004-->
									<table border="0" width="100%"><tr>
									<td width="80%">
									<html:text  name="boardInventorydataentryform" property="insertingDateIn" size="14" maxlength='10' styleClass="txfield" value="<%=insertDateIn[jj]%>" />
									</td><td width="20%"><a href="javascript:openCalendar(document.boardInventorydataentryform.insertingDateIn)">
									<img onMouseOver="window.status='Click here to select date';return true"onMouseOut="window.status='';return true" border="0" align='center'
									src="<%=chipTracContext%>/jsp/includes/images/date_selector.gif" height=20 width=20></a>
									</td></tr></table>
									</td>
									<td width="20%" align="center" class="NArialL"><html:text  name="boardInventorydataentryform" property="insertingQuantityIn" size="16" maxlength="7" styleClass="txfield" value ="<%=insertQuantityIn[jj]%>" /></td>
									<td width="20%" align="center" class="NArialL"><html:text  name="boardInventorydataentryform" property="testedQuantity" size="16" maxlength="7" styleClass="txfield" value ="<%=testedQuantity[jj]%>" /></td>
									<td width="20%" align="center" class="NArialL"><html:text  name="boardInventorydataentryform" property="rejectedQuantity" size="16" maxlength="7" styleClass="txfield" value ="<%=rejectedQuantity[jj]%>" /></td>
                                    <td width="20%" align="center" class="NArialL"><html:text  name="boardInventorydataentryform" property="dateCodes" size="16" maxlength="50" styleClass="txfield" value ="<%=dateCodes[jj]%>" /></td>
								</tr>
								<% } %>
								</logic:present>
								<logic:notPresent name="showData">
								<tr>
									<td width="20%" align="center" class="NArialL"><html:text  name="boardInventorydataentryform" property="newLotNumber" size="16" maxlength="50" styleClass="txfield" value = ""/></td>
									<td width="20%" align="center" class="NArialL">
									<!--A table is inserted only to improve the layout and avoid distortion when window is not in maximised mode. Bhaskar on 26 Feb 2004-->
									<table border="0" width="100%"><tr>
									<td width="80%">
									<html:text  name="boardInventorydataentryform" property="insertingDateIn" size="14" maxlength='10' styleClass="txfield" value = "<%= dateIn%>"/></td>
									<td width="20%">
									<a href="javascript:openCalendar(document.boardInventorydataentryform.insertingDateIn)">
									<img onMouseOver="window.status='Click here to select date';return true" onMouseOut="window.status='';return true"  border="0" align='center'
									src="<%=chipTracContext%>/jsp/includes/images/date_selector.gif" height=20 width=20></a>
									</td></tr></table>
									</td>
									<td width="20%" align="center" class="NArialL"><html:text  name="boardInventorydataentryform" property="insertingQuantityIn" size="16" maxlength="7" styleClass="txfield" value =""/></td>
									<td width="20%" align="center" class="NArialL"><html:text  name="boardInventorydataentryform" property="testedQuantity" size="16" maxlength="7" styleClass="txfield" value =""/></td>
									<td width="20%" align="center" class="NArialL"><html:text  name="boardInventorydataentryform" property="rejectedQuantity" size="16" maxlength="7" styleClass="txfield" value ="" /></td>
                                    <td width="20%" align="center" class="NArialL"><html:text  name="boardInventorydataentryform" property="dateCodes" size="16" maxlength="50" styleClass="txfield" value ="" /></td>
								</tr>
								</logic:notPresent>
								</table>
							</td></tr>

							<tr><td colspan ="4"><FONT id="font1"></FONT></td></tr>

							<tr><td colspan="4">&nbsp;</td></tr>
							<tr>
								<td colspan="4" align="center"><a href='javascript:addTextBoxes();'><IMG src='<%=chipTracContext%>/jsp/includes/images/addmore.gif' border=0 width="60" height="17" onmouseover="window.status='Click to Add more Text Boxes';return true" onmouseout="window.status='';return true" title="Click here to Add more Text Boxes"></a>
								&nbsp;&nbsp;&nbsp;&nbsp;
								<chiptrack:restrictedLink functionality='<%=Functionality.BOARD_INVENTORY%>' action='<%=User.USER_ACTION_MODIFY%>' href='javascript:boardInventoryDataEntry();' onmouseover="window.status='Click to Save Lot Details';return true" onmouseout="window.status='';return true">
								<img border="0" src="<%=chipTracContext%>/jsp/includes/images/save.gif" width="53" height="17" title="Click here to Save Lot Details"></chiptrack:restrictedLink>
								&nbsp;&nbsp;&nbsp;&nbsp;
								<a href="<%=chipTracContext%>/boardInventoryDataEntry.do?action=type"><img border="0" src="<%=chipTracContext%>/jsp/includes/images/cancel.gif" width="53" height="17" onmouseover="window.status='Click to Cancel Changes';return true" onmouseout="window.status='';return true" title="Click here to Cancel Changes"></a>
								</td>
							</tr>

							<%} else  {%>
							<tr> <td colspan = "4">
								<table border="0" width="100%" bordercolor="#FFFFFF">
								<tr>
									<td width="20%" align="center" bgcolor="#993333" class="NArialL">
									<font color="#FFFFFF">Lot Number *</font></td>
									<td width="20%" align="center" bgcolor="#993333" class="NArialL">
									<font color="#FFFFFF">Date In *</font></td>
									<td width="20%" align="center" bgcolor="#993333" class="NArialL" >
									<font color="#FFFFFF">Un tested Qty *</font></td>
									<td width="20%" align="center" bgcolor="#993333" class="NArialL">
									<font color="#FFFFFF">Good Qty </font></td>
									<td width="20%" align="center" bgcolor="#993333" class="NArialL">
									<font color="#FFFFFF">Rejected Qty</font></td>
                                    <td width="20%" align="center" bgcolor="#993333" class="NArialL">
									<font color="#FFFFFF">Date Code</font></td>
								</tr>

								<tr>
								<% String dateIn = (String)request.getAttribute ( "InsertingDateIn" );
								   String quantityIn = (String)request.getAttribute ( "InsertingQuantityIn" );
								   String lotNumber = (String)request.getAttribute ( "InsertingNewLotNumber" );
								   String testedQty = (String)request.getAttribute ( "testedQuantity" );
								   String rejectedQty = (String)request.getAttribute ( "rejectedQuantity" );
                                   String dateCode  = (String)request.getAttribute("dateCode");
								%>
									<td width="20%" align="center" class="NArialL"><html:text  name="boardInventorydataentryform" property="newLotNumber" size="16" maxlength="50" styleClass="txfield" value = "<%= lotNumber%>"/></td>
									<td width="20%" align="center" class="NArialL">
									<!--A table is inserted only to improve the layout and avoid distortion when window is not in maximised mode. Bhaskar on 26 Feb 2004-->
									<table border="0" width="100%"><tr>
									<td width="80%">
									<html:text  name="boardInventorydataentryform" property="insertingDateIn" size="14" maxlength="10" styleClass="txfield" value = "<%= dateIn%>"/></td>
									<td width="20%">
									<a href="javascript:openCalendar(document.boardInventorydataentryform.insertingDateIn)">
									<img onMouseOver="window.status='Click here to select date';return true" onMouseOut="window.status='';return true" border="0" align='center'
									src="<%=chipTracContext%>/jsp/includes/images/date_selector.gif" height=20 width=20></a>
									</td></tr></table>
									</td>
									<td width="20%" align="center" class="NArialL"><html:text  name="boardInventorydataentryform" property="insertingQuantityIn" size="16" maxlength="7" styleClass="txfield" value = "<%= quantityIn%>" disabled="true" /></td>
									<td width="20%" align="center" class="NArialL"><html:text  name="boardInventorydataentryform" property="testedQuantity" size="16" maxlength="7" styleClass="txfield" value ="<%=testedQty%>" /></td>
									<td width="20%" align="center" class="NArialL"><html:text  name="boardInventorydataentryform" property="rejectedQuantity" size="16" maxlength="7" styleClass="txfield" value ="<%=rejectedQty%>" /></td>
                                    <td width="20%" align="center" class="NArialL"><html:text  name="boardInventorydataentryform" property="dateCodes" size="16" maxlength="50" styleClass="txfield" value ="<%=dateCode%>" /></td>
								</tr>
                                </table>
                            </td></tr>

							<tr><td colspan="4">&nbsp;</td></tr>
							<tr>
								<td colspan="4" align = "center">
								<chiptrack:restrictedLink functionality='<%=Functionality.BOARD_INVENTORY%>' action='<%=User.USER_ACTION_MODIFY%>' href='javascript:boardInventoryDataEntry();' onmouseover="window.status='Click to Save Board Inventory Details';return true" onmouseout="window.status='';return true">
								<img border="0" src="<%=chipTracContext%>/jsp/includes/images/save.gif" width="53" height="17" title="Click here to Save Board Inventory Details"></chiptrack:restrictedLink>
								&nbsp;&nbsp;&nbsp;&nbsp;
								<a href="<%=chipTracContext%>/boardInventoryDataEntry.do?action=type"><img border="0" src="<%=chipTracContext%>/jsp/includes/images/cancel.gif" width="53" height="17"onmouseover="window.status='Click to Cancel Changes';return true" onmouseout="window.status='';return true" title="Click here to Cancel Changes"></a></td>
							</tr>
							<%}%>
						<%}%>
						</table>
					<!-- till here -->
				</TD>
				<TD bgcolor="#ffffff"><IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=1></TD>
			</TR>
		</TABLE>
		<!-- Footer starts here -->
		<%@ include file="/jsp/includes/footer.jsp" %>
		<!-- footer end here -->
		</html:form>
	</BODY>
</HTML>
